package com.rt.cms.dao;


import com.rt.cms.data.entity.TbApprovalRecord;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TbApprovalRecordMapper {

    //������¼������
    int insertApprovalRecord(TbApprovalRecord tbApprovalRecord);

    //������¼�Ĳ�ѯ
    List<TbApprovalRecord> queryApprovalRecords();

    //��ѯ������¼
    TbApprovalRecord queryApprovalRecord(int id);

    List<TbApprovalRecord> queryApprovalRecordByUsrId(int comInfoId);

    List<TbApprovalRecord> queryDormanyRecordByUsrId(int comInfoId);

    List<TbApprovalRecord> queryWaitDormanyRecordByUsrId(int comInfoId);

    TbApprovalRecord queryApprovalRecordByStatus(@Param("comInfoId") int comInfoId,@Param("status") int status);

    TbApprovalRecord queryDormanyRecordByStatus(@Param("comInfoId") int comInfoId,@Param("status") int status);

    List<TbApprovalRecord> selectByParam(@Param("comInfoId") int comInfoId,@Param("offset") int offset,@Param("limit") int limit);

    Long selectCount(@Param("comInfoId") int comInfoId);

    List<TbApprovalRecord> selectDormanyByParam(@Param("comInfoId") int comInfoId,@Param("offset") int offset,@Param("limit") int limit);

    Long selectDormanyCount(@Param("comInfoId") int comInfoId);
}
